﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;

using NUnit.Framework;


namespace INSTA.Library.Tests
{
    [TestFixture]
    public class Test_ObjectDumper
    {
        [Test]
        public void Test_Method_Write()
        {
            ObjectDumper.Write(new MockPerson());
        }

        [Test]
        public void Test_Method_Write_Depth()
        {
            var x = new
                        {
                            FamilyName = "Simpson",
                            Members = new List<String>() {"Bart", "Homer", "Marge", "Lisa"}
                        };

            ObjectDumper.Write(x, 1);
        }


        [Test]
        public void Test_Method_Write_DepthWithObject()
        {
            

            var x = new
            {
                FamilyName = "Simpson",
                Members = new [] { 
                    new
                        {
                            FirstName = "Bart",
                            Age = 8,
                        },
                        new
                        {
                            FirstName = "Lisa",
                            Age = 5,
                        },
                        new
                        {
                            FirstName = "Homer",
                            Age = 45,
                        },
                        new
                        {
                            FirstName = "Marge",
                            Age = 42,
                        },
                }
            };

            ObjectDumper.Write(x, 1);
        }

    }
}
